[WIP] Add more functions to lovelace ws#17702
[WIP] Add more functions to lovelace ws#17702bramkragten wants to merge 1 commit intohome-assistant:devfrom
Conversation
| WS_TYPE_DELETE_CARD = 'lovelace/config/card/delete' | ||
|
|
||
| WS_TYPE_GET_VIEW = 'lovelace/config/view/get' | ||
| WS_TYPE_SET_VIEW = 'lovelace/config/view/set' |
There was a problem hiding this comment.
We should not support this. People can move individual cards but shouldn't be able to do many cards at once.
There was a problem hiding this comment.
The idea was that you would get the config of the view, without the cards, and could edit the name and icon, etc. But that was for a different PR, so should not have been in here...
There was a problem hiding this comment.
Good point. We should make a update command for view, but it should exclude cards then.
|
|
||
| WS_TYPE_GET_CARD = 'lovelace/config/card/get' | ||
| WS_TYPE_SET_CARD = 'lovelace/config/card/set' | ||
| WS_TYPE_ADD_CARD = 'lovelace/config/card/add' |
There was a problem hiding this comment.
Code review would be a lot easier if you either have a single commit per WS command, so it's easy to review. Or if you do a PR per command.
There was a problem hiding this comment.
Will do, tomorrow night I'll have time to work on it.
| WS_TYPE_GET_LOVELACE_UI = 'lovelace/config' | ||
|
|
||
| WS_TYPE_GET_CARD = 'lovelace/config/card/get' | ||
| WS_TYPE_SET_CARD = 'lovelace/config/card/set' |
There was a problem hiding this comment.
Should we rename set to update, maybe it is clearer?
|
Closing for #17730 |
WIP
Description:
Adds more functions to the websocket for lovelace. This should complete the functions for the cards. Next up are the views.
TODO:
Test and add tests
Related issue (if applicable): fixes #
Pull request in home-assistant.io with documentation (if applicable): home-assistant/home-assistant.io#<home-assistant.io PR number goes here>
Example entry for
configuration.yaml(if applicable):Checklist:
tox. Your PR cannot be merged unless tests passIf user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
REQUIREMENTSvariable (example).requirements_all.txtby runningscript/gen_requirements_all.py..coveragerc.If the code does not interact with devices: